var _rotaban={apiurl:"//"+["s3.rotaban.ru","s4.rotaban.ru"][Math.floor(Math.random()*2)]+"/s/",dz:[],dii:[],drop:function(n,t){this.dii[t]=this.dii[t]||0;var i="rotaban_"+t+(++this.dii[t]==1?"":"_"+this.dii[t]);document.write('<div id="'+i+'" class="rotaban_'+t+' rotaban"><\/div>');this.idrop(i,n,t)},idrop:function(n,t,i){if(this.dz[i]=this.dz[i]||[],this.dz[i].push(n),document.getElementById("_rotaban_js_"+t))this.jz&&this.deploy();else{var r=document.createElement("script"),u=new Date;r.type="text/javascript";r.id="_rotaban_js_"+t;r.src=this.apiurl+t+".js?v="+u.getTime();r.referrerPolicy="strict-origin-when-cross-origin";r.setAttribute("async","async");document.getElementsByTagName("head")[0].appendChild(r)}},exec:function(){this.callback=typeof RBCallback=="function"?RBCallback:function(){};for(var u=function(n){for(var r=!!document.getElementsByClassName,u=[],i=r?document.getElementsByClassName(n):document.getElementsByTagName("*"),f=r?!1:new RegExp("(^|\\s)"+n+"(\\s|$)"),t=0;t<i.length;t++)(!f||f.test(i[t].className))&&u.push(i[t]);return u},t=u("rbrocks"),r,i,n=0;n<t.length&&(r=t[n].getAttribute("id"))&&(rid=r.split("_")[1])&&(i=t[n].getAttribute("rel")||((i=/rotaban_([a-f0-9]+)/i.exec(t[n].className))?i[1]:""))&&(t[n].className="rotaban_"+rid+" rotaban");n++)this.idrop(r,i,rid)},deploy:function(){for(var n=0,r,t,u,i,f;n<this.jz.length&&(t=this.jz[n])&&(r=1);n++)while(++r<10&&(f=this.dz[t.id])&&(u=f.pop())&&(i=document.getElementById(u))&&!i.innerHTML.replace(/(^(\s|&nbsp;)+)|((\s|&nbsp;)+$)/g,"").length)new this.zone(i,t,this)},zone:function(n,t,i){for(var e=[],o=t.filters,h=["all"],a,v,s,r=0;o&&r<h.length;r++)e=e.concat(typeof o[h[r].toLowerCase()]=="object"?o[h[r].toLowerCase()].ads:[]);e=e.length?{ads:e}:o.all||t;var u=!e||!e.ads||!e.ads.length?[]:i.getads(e,t.nads),p=u[0],l="",f="",c,y=function(n){var t=document.createElement("style");t.type="text/css";t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n));document.getElementsByTagName("head")[0].appendChild(t)};if(y(i.getCss(i,t)),u.length>0)for(a=t.nads<u.length?t.nads:u.length,r=0;r<a;r++)c=i.getads(u[r],1)[0],f+=i.getObj(i,t,c,r+1),l+=c.id+";";if((u.length==0||u.length<t.nads)&&t.showadhere)for(v=t.repeatadhere==!1?1:t.nads-u.length,r=0;r<v;r++){if(t.batype==3){f+=t.bacodeurl!=""?'<iframe width="'+t.bawidth+'" height="'+t.baheight+'" src="'+t.bacodeurl+"?r="+Math.random()+'" frameborder="0" hspace="0" vspace="0" marginheight="0" marginwidth="0" scrolling="no" allowtransparency="true" style="left:0;top:0;"><\/iframe>':t.bacode;continue}f+='<a href="https://www.rotaban.ru/buy/site/?'+t.siteurl+'" title="'+t.buyadvertising+'" class="rb_adhere"';t.batype==1&&(f+=' style="background-image: url('+t.bapreurl+');background-repeat: no-repeat;"');f+=' target="_blank">';f+=t.batype==2?'<img src="'+t.baurl+'" alt="'+t.buyadvertising+'" width="'+t.width+'" height="'+t.height+'" border="0" />':t.buyadvertising;f+="<\/a>"}if(t.batype==4&&u.length>0)try{s=document.getElementById(t.baelement);s==null&&(f="Rotaban Script Error: Can't find element '"+t.baelement+"'.");s.style.display="none";s.style.visibility="hidden"}catch(w){}t.buyout&&(t.batype==1||t.batype==0)&&u.length==0&&t.betweensubid&&t.betweensubid.length>0&&t.betweensection&&t.betweensection.length>0&&document.getElementById("b_script_"+t.betweensection)===null&&window.inBetween!==!0?_rotaban.betweenCode(t.betweensubid,t.betweensection,n,f,t):n.innerHTML=f;_rotaban.rocks("imp",l,t.id)},betweenCode:function(n,t,i,r,u){var f;window["subid_"+t]=n;var o=document.createComment("BETWEEN SSP CODE V3.0 START"),s=document.createComment("BETWEEN SSP END"),e=document.createElement("div");e.setAttribute("id","b_script_"+t);f=document.createElement("script");f.setAttribute("async",!0);f.setAttribute("src","//cache.betweendigital.com/sections/2/"+t+".js");e.appendChild(f);i.appendChild(o);i.appendChild(e);i.appendChild(s);var h='<!-- RotaBan.ru Zone Code --><div id="rotaban_'+u.id+'" class="rbrocks rotaban_'+u.siteid.replace(/-/g,"")+'"><\/div><!-- END RotaBan.ru Zone Code -->',c=0,l=setInterval(function(){var n=document.getElementById("btw_ad_"+t);n&&(n.onload=function(){this.src=this.src+"#"+encodeURIComponent(h)});(c>25||n)&&clearInterval(l)},200)},getCss:function(n,t){var e=t.bannerstyles,u=t.width,f=t.height,o=u-2,s=f-2,r="";for(r+="div.rotaban_"+t.id+"{width:"+(t.vertical==!0?u+"px":"100%")+";display:"+(t.vertical==!0?"inline-":"")+"block;}",r+="div.rotaban_"+t.id+" a{width:"+u+"px;}",r+="div.rotaban_"+t.id+" a img{padding:0;}",r+="div.rotaban_"+t.id+" a em{font-style:normal;}",(t.batype==1||t.batype==2)&&(r+="div.rotaban_"+t.id+" a.rb_adhere{width:"+u+"px;height:"+f+"px;border:0px solid #999}",r+="div.rotaban_"+t.id+" a.rb_adhere:hover{border:0px solid #999}",r+="div.rotaban_"+t.id+" img.s{height:0;width:0;}"),i=0;i<e.length;i++)e[i]!=""&&(r+="html>body div.rotaban_"+t.id+" "+e[i]);return t.vertical==!1&&(r+="html>body div.rotaban_"+t.id+" a{display:inline-block;position:relative;vertical-align:top;}"),u<100&&(r+="div.rotaban_"+t.id+" a em{display:block;text-indent:-9010px;}",r+="div.rotaban_"+t.id+" a{height:"+f+"px;line-height:0;}",r+="div.rotaban_"+t.id+" a.rb_adhere{font-size:0;}"),r+="div.rotaban_"+t.id+" a.rb_adhere{width:"+u+"px;height:"+f+"px;line-height:"+f*8+"%;}",t.batype==1||t.batype==2?(r+="div.rotaban_"+t.id+" a.rb_adhere{width:"+u+"px;height:"+f+"px;border:0px solid #999}",r+="div.rotaban_"+t.id+" a.rb_adhere:hover{border:0px solid #999} div.rotaban_"+t.id+" img.s{height:0;width:0;}"):(r+="div.rotaban_"+t.id+" a.rb_adhere{width:"+o+"px;height:"+s+"px;border:1px solid #ccc;background:#e7e7e7;color:#444;}",r+="div.rotaban_"+t.id+" a.rb_adhere:hover{border:1px solid #999;background:#ddd;color:#222;}",r+="div.rotaban_"+t.id+" img.s{height:0;width:0;}"),r},getObj:function(n,t,i,r){return i.type=="code"?i.codeurl!=""?"<a "+n.link(i.id,t.id,i.link)+'><iframe width="'+t.width+'" height="'+t.height+'" src="'+i.codeurl+"?r="+Math.random()+'" frameborder="0" hspace="0" vspace="0" marginheight="0" marginwidth="0" scrolling="no" allowtransparency="true" style="left:0;top:0;"><\/iframe><\/a>':"<a "+n.link(i.id,t.id,i.link)+">"+i.code+"<\/a>":"<a "+n.link(i.id,t.id,i.link)+' class="rb_ad'+r+" "+(r%2==0?"even":"odd")+'" title="'+i.alt+'" id="rb_'+i.id+'" target="_blank"><img src="'+i.img+'" width="'+t.width+'" height="'+t.height+'" alt="'+i.alt+'"/><\/a>'},getads:function(n,t){var u="",f,i=n.ads,e=[],o=[],r;if(!i)return[n];if(i.length<=t||i.length===1)return this.shuffle(i);for(r=0;r<i.length;r++)u+=new Array((i[r].per||i[r].cap-i[r].current)+1).join(r+",");for(u=u.substr(0,u.length-1).split(",");e.length<t&&r++<t*100&&(f=i[u[Math.floor(Math.random()*u.length)]]);){if(t===1)return[f];o[f.id]||(o[f.id]=1,e.push(f))}return e},shuffle:function(n){for(var i,r,t=n.length;t;i=parseInt(Math.random()*t),r=n[--t],n[t]=n[i],n[i]=r);return n},interpret_json:function(n){this.jz=typeof this.jz=="object"?this.jz.concat(n.zones):n.zones;var t=new Image;t.src="//s1.rotaban.ru/save_c.php?rc="+n.categories;this.deploy()},rocks:function(n,t,i){var r=this.gen("_rbu",30),u=this.gen("_rbs",1/2),f=new Image;f.src=this.tracker(n+".gif",t,i,r,u,"","s7")},link:function(n,t,i){return'href="'+i+"\" onclick=\"_rotaban.rocks('click', '"+n+"', '"+t+"');\""},tracker:function(n,t,i,r,u,f,e){return"//"+e+".rotaban.ru/"+n+"?z="+i+"&b="+t+"&g="+r+"&s="+u+"&sw="+screen.width+"&sh="+screen.height+"&br="+this.br()+"&r="+Math.random()+f},br:function(){var n=navigator.userAgent,i=navigator.platform,r=function(n,t){for(var i=0;i<t.length;i++)n=n.replace(t[i][0],t[i][1]);return n},t=(n.match(/Opera|Navigator|Minefield|KHTML|Chrome/)?r(n,[[/(Firefox|MSIE|KHTML,\slike\sGecko|Konqueror)/,""],["Chrome Safari","Chrome"],["Minefield","Firefox"]]):n).toLowerCase();return[(/(camino|chrome|firefox|opera|msie|safari)/.exec(t)||["","?"])[1],parseFloat((/(camino|chrome|firefox|opera|msie|safari)(\/|\s)([a-z0-9\.\+]*?)(\;|dev|rel|\s|$)/.exec(t)||[0,0,0,0])[3],10)||0,(/(win|mac|linux|iphone|blackberry|pike)/.exec(i.toLowerCase())||["?"])[0]]},gen:function(n,t){var u=document.cookie,f=u.indexOf(n+"="),i,r;return f>=0?u.substring(f+n.length+1).split(";")[0]:(i=new Date,r=+i,i.setTime(t*36e5+r),document.cookie=n+"="+(r+Math.random().toString().substr(2,7))+"; expires="+i.toGMTString()+"; path=/",-1)}},_bi,oldonload;if(_rotaban_loadedme=1,typeof _rotaban_loadme=="object")for(_bi=0;_bi<_rotaban_loadme.length;_bi++)_rotaban_loadme[_bi](),_rotaban_loadme[_bi]=function(){};document.addEventListener?document.addEventListener("DOMContentLoaded",function(){_rotaban.exec()},!1):/msie/.test(navigator.userAgent.toLowerCase())&&window==top&&(function(){try{document.documentElement.doScroll("left")}catch(n){setTimeout(arguments.callee,0);return}_rotaban.exec()}(),window.document.onreadystatechange=function(){window.document.readyState=="complete"&&(window.document.onreadystatechange=null,_rotaban.exec())});oldonload=window.onload;window.onload=typeof onload!="function"?_rotaban.exec():function(){oldonload();_rotaban.exec()};_rotaban.exec()